<!doctype html>
<html>
<head>
    <title>列表页面</title>
    <?php $this->load->module('admin/index/page_header');?>
    <link href="<?php echo URLPRE;?>static/admin/css/font_icon.css" rel="stylesheet" />
      <style>
        .item-1,.item{border-bottom: 1px solid #d9d9d9;}
        .item-1{height:100px;overflow:hidden;padding:5px;position:relative;display: block;}
        .item-1 em, .item-1 span{display:block;position: absolute;bottom:0;left:0;width: 100%;height:30px;line-height:30px;overflow:hidden;}
        .item-1 em{background: #000;opacity: .6;}
        .item-1 span{color:#fff;z-index:1;padding:0 5px;}
        .item{line-height:30px;height:30px;overflow:hidden;padding:5px;}
        .item span{float: left;width:80%;overflow:hidden;}
        .item img{float:right;height:30px;width:30px;}
      </style>
</head>
<body>
<div id="mainContent" class="wrap">
    <div class="h_a">搜索</div>
    <div class="search_type cc mb10">
        <form action="<?php $form_url;?>" method="get">
            <div class="ul_wrap">
                <label>关键字：</label>
                <input type="text" class="input length_3" name="word"  value="<?php if(!empty($condition['word'])) echo $condition['word'] ;?>" placeholder='关键词'>
                <button class="btn" type="submit">搜索</button>
            </div>
        </form>
    </div>
    <div class="nav">
        <ul>

            <li>
                <a  href="<?php echo site_url('weixin/wresponse/response_text_list')?>">响应消息列表</a>
            </li>
             <li class="current">
                <a href="javascript:;" >关键词列表</a>
            </li>
             <li>
                 <a  class="icon-plus" href="<?php echo site_url('weixin/wresponse/add_keywords')?>">添加关键词</a>
            </li>


        </ul>
    </div>
    <div class="h_a">关键词列表</div>
    <div id="content" class="table_full">

            <table>
                <tr>
                    <th style="width:2%;">ID</th>
                    <th style="width:4%;">关键词</th>
                    <th style="width:4%;">类型</th>
                    <th style="width:4%;">内容</th>
                    <th style="width:4%;">添加时间</th>
                    <th style="width:4%;">操作</th>
                </tr>
                <?php foreach($keywords_array as $k=>$v):?>
                    <tr>
                    <td style="width:2%;display:none">
                        <input type="checkbox" value="<?php echo $v['user_id'];?>" name="id[]">
                    </td>
                    <td><a href="<?php echo site_url('weixin/wkeywords/edit_keywords/'.$v['id']);?>"><?php echo $v['id'];?></a></td>
                    <td style="width:4%;"><?php echo $v['keywords'];?></td>
                    <td style="width:4%;">
                        <?php if($v['type']=='1'):?>
                            自定义网址
                        <?php else:?>
                            线路
                        <?php endif;?>
                    </td>
                    <td style="width:4%;">
                        <?php if($v['type']==1):?>
                            <div style="background:#fff">
                                    <ul class="clearfix">
                                        <?php if($v['preview_data']):?>
                                            <li class="item-1" style="background: url(<?php echo URLPIC . $v['preview_data']['pic'] ?>) 50% 50% / cover no-repeat">
                                                <span><?php echo $v['preview_data']['title']; ?></span>
                                                <em></em>
                                            </li>
                                        <?php endif;?>
                                    </ul>
                                </div>
                            <?php else:?>
                            <div style="background:#fff">
                                    <ul class="clearfix">
                                    <?php if($v['preview_data']):?>
                                        <?php foreach ($v['preview_data'] as $key => $val):?>
                                           <?php if ($key == 0):?>
                                                <li class="item-1" style="background: url(<?php echo URLPIC . $val['line_thumb'] ?>) 50% 50% / cover no-repeat">
                                                    <span><?php echo $val['line_name']; ?></span>
                                                    <em></em>
                                                </li>
                                            <?php else:?>
                                                <li class="item">
                                                    <span><?php echo $val['line_name']; ?></span>
                                                    <img src="<?php echo URLPIC . $val['line_thumb'] ?>">
                                                </li>
                                                <?php endif;?>
                                        <?php endforeach;?>
                                    <?php endif;?>
                                    </ul>
                                </div>
                        <?php endif;?>
                    </td>
                    <td style="width:4%;"><?php echo $v['crts'] ;?></td>
                    <td style="width:4%" class="btn_min">
                        <a class="icon-pencil" href="<?php echo site_url('weixin/wresponse/edit_keywords/'.$v['id']);?>">编辑</a>
                        <a class="icon-remove-2 doDel" href="javascript:;" data-uri="<?php echo site_url('weixin/wresponse/delete_keywords?id='.$v['id']);?>">删除</a>
                    </td>
                </tr>
                <?php endforeach ;?>
            </table>
        <div class="page_nav">
            <?php echo $this->mypageclass->show(2); ?>
        </div>
    </div>
</div>

</body>
</html>